package com.future.bantang.utils;

import android.util.Log;
import android.widget.Toast;

import com.future.bantang.app.BanTangAPP;

/**
 * Created by Administrator on 16-1-11.
 */
public class L {

    public static final String TAG="-----BanTang-----";

    public static final int VERBOSE=1;
    public static final int DEBUG=2;
    public static final int INFO=3;
    public static final int WORN=4;
    public static final int ERROR=5;
    public static final int ASSERTS=6;
    public static final int OFF=7;

    public static final int curstate=VERBOSE;

    //*******************************************
    public static void v(String info){
        if (VERBOSE>=curstate){
            Log.v(TAG,info);
        }
    }

    public static void v(String tag,String info){
        if (VERBOSE>=curstate){
            Log.v(tag,info);
        }
    }

    //*******************************************
    public static void d(String info){
        if (DEBUG>=curstate){
            Log.d(TAG, info);
        }
    }

    public static void d(String tag,String info){
        if (DEBUG>=curstate){
            Log.d(tag, info);
        }
    }

    //*******************************************
    public static void i(String info){
        if (INFO>=curstate){
            Log.i(TAG, info);
        }
    }

    public static void i(String tag,String info){
        if (INFO>=curstate){
            Log.i(tag, info);
        }
    }


    //*******************************************
    public static void w(String info){
        if (WORN>=curstate){
            Log.w(TAG, info);
        }
    }

    public static void w(String tag,String info){
        if (WORN>=curstate){
            Log.w(tag, info);
        }
    }

    //*******************************************
    public static void e(String info){
        if (ERROR>=curstate){
            Log.e(TAG, info);
        }
    }

    public static void e(String tag,String info){
        if (ERROR>=curstate){
            Log.e(tag, info);
        }
    }


    //*******************************************
    public static void toast(String info){
        Toast.makeText(BanTangAPP.getApp(),info, Toast.LENGTH_SHORT).show();
    }

}
